package org.tis.tools.model.log.enums;

import org.tis.tools.model.enums.BaseEnum;

import java.io.Serializable;

/**
 * description: 操作类型
 *
 * @author zhaoch
 * @date 2018/5/15
 **/
public enum OperateType implements BaseEnum {

    /**
     * 增删改查
     */
    ADD("add", "新增"),
    DELETE("delete", "删除"),
    UPDATE("update", "修改"),
    QUERY("query", "查询");

    private final String value;

    private final String name;

    OperateType(final String value, final String name) {
        this.value = value;
        this.name = name;
    }

    @Override
    public Serializable deserialze() {
        return name;
    }

    @Override
    public Serializable getValue() {
        return value;
    }

    @Override
    public String toString() {
        return name;
    }
}
